#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton*button= new QPushButton(this);
    button->setText("按钮");
    button->move(100,100);

    connect(button,&QPushButton::clicked,this,&Widget::hande);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::hande()
{
    //修改窗口地标题
    this->setWindowTitle("已近按下按钮");
}

